﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Email分析
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //string email = textBox1.Text;
            //string[] strs = email.Split('@');
            //if (strs.Length != 2)
            //{
            //    MessageBox.Show("请输入合法的邮箱地址！");
            //    return;
            //}
            //textBox2.Text = strs[0];
            //textBox3.Text = strs[1];

            string email = textBox1.Text;
            string[] strs = email.Split('@');
            if (strs.Length != 2)
            {
                MessageBox.Show("invalid email!");
                return;
            }
            textBox2.Text = strs[0];
            textBox3.Text = strs[1];
            
        }
    }
}
